home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-05 | 14.8 KB | 381 lines | [TEXT/R*ch] |
- --$Revision: 4.0 $
- --DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT
- --********************************************************************
- --
- -- BLAST Interface, 1.8
- -- revised April 1995 by Tom Madden and Jim Ostell
- --
- -- original author:
- -- Warren Gish
- -- September 1993
- -- For a good look, set tabstops every 4 columns
- --
- --
- --
- --********************************************************************
- --DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT
-
- NCBI-BLAST-1 DEFINITIONS ::=
- BEGIN
-
- EXPORTS
- BLAST0-Preface,
- BLAST0-Job-desc,
- BLAST0-Job-progress,
- BLAST0-Sequence,
- BLAST0-KA-Blk,
- BLAST0-Db-Desc,
- BLAST0-Result,
- BLAST0-Matrix,
- BLAST0-Warning,
- BLAST0-Status,
- BLAST0-Outblk;
-
- IMPORTS
- Seq-align-set, Score-set FROM NCBI-Seqalign;
-
- BLAST0-Request ::= CHOICE { -- list of possible client messages to the server
- hello VisibleString, -- a client-selectable session name for themselves
- motd NULL, -- request messages-of-the-day
- prog-info NULL, -- request a list of programs available on this server
- usage-info VisibleString, -- gets a BLAST0-Preface that includes
- -- the valid options (prog-usage) for this program.
- db-info NULL, -- request a list of databases
- matrix-info NULL, -- request a sequence of BLAST0-Matrix, without
- -- the actual scores.
- matrix-get VisibleString, -- get one BLAST0-Matrix, with scores.
- search BLAST0-Search,
- goodbye NULL -- hang-up
- }
-
- BLAST0-Search ::= SEQUENCE {
- program VisibleString,
- database VisibleString,
- query BLAST0-Sequence,
- options SEQUENCE OF VisibleString OPTIONAL,
- -- BLAST command line options, see the BLAST manunal pages
- -- for a list of these.
- --
- -- listed below are BOOLEANS that determine the number and type of
- -- elements returned in the BLAST0-Response.
- --
- return-matrix BOOLEAN DEFAULT TRUE,
- -- should the matrix used be sent? Only needed if an alignment
- -- showing positive/negative interactions between aligned residues
- -- will be presented.
- return-query BOOLEAN DEFAULT TRUE,
- -- if TRUE, the original query is returned in BLAST0-Response.query .
- return-BLAST0result BOOLEAN DEFAULT TRUE,
- -- if TRUE, a BLAST0-Result is sent back in BLAST0-Response.result;
- -- if not true, a Seq-align-set is returned in BLAST0-Response.seqalign
- -- (see comment in the BLAST0-Response definition concerning the
- -- type of Seq-align returned).
- return-query-seq-in-seg BOOLEAN DEFAULT TRUE,
- -- if TRUE, part of the query sequence, useful for an alignment,
- -- is returned in the BLAST0-Sequence that is referenced by
- -- BLAST0-HSP.segs.
- return-db-seq-in-seg BOOLEAN DEFAULT TRUE
- -- if TRUE, part of the database sequence, useful for an alignment,
- -- is returned in the BLAST0-Sequence that is referenced by
- -- BLAST0-HSP.segs.
- }
-
- BLAST0-Response ::= CHOICE { -- list of possible server messages to client
- hello VisibleString, -- server version and session identification data
- motd VisibleString, -- the message of the day, new lines are
- -- indicated by tildes ("~")
- prog-info SEQUENCE OF BLAST0-Preface, -- list of programs
- usage-info BLAST0-Preface, -- includes valid options for program
- db-info SEQUENCE OF BLAST0-Db-Desc, -- response to BLAST0-Request.db-info
- matrix-info SEQUENCE OF BLAST0-Matrix, -- does not include scores
- ack BLAST0-Ack, -- final response to search
- goodbye BLAST0-Ack, -- server-initiated close of connection
-
- -- For the blast service, the application programs that perform the search
- -- are independent entities from the server daemon itself that may
- -- abort/crash for any one of a variety of reasons.
- -- Response to a Search request thus consists of a procession of choices
- -- of the following discrete messages, from "queued" through "status",
- -- with each one (except "queued") generated by the application program;
- -- the complete response to a Search request is finally indicated
- -- when the client receives an "ack" generated by the blast network
- -- service daemon. If the "ack" is received without a previous "status",
- -- the client should assume that a severe problem occurred
- -- in the application program and any output that was received
- -- should be considered dubious in quality.
- -- See BLAST0-Outblk for a description of how these discrete messages
- -- can be bundled together for archival purposes.
- queued BLAST0-Queued, -- series of these when a search has been queued
- preface BLAST0-Preface, -- description of program used for search,
- query BLAST0-Sequence, -- the original query sequence
- dbdesc BLAST0-Db-Desc, -- description of database used for search,
- matrix SEQUENCE OF BLAST0-Matrix, -- the scoring scheme(s) used
- kablk SEQUENCE OF BLAST0-KA-Blk, -- Karlin-Altschul statistics data block
- job-start BLAST0-Job-desc,
- job-progress BLAST0-Job-progress,
- job-done BLAST0-Job-progress,
- score-defs SEQUENCE OF BLAST0-Score-Info,
- -- The score-defs assign integer numbers to each of the different
- -- score definitions that are used as part of the BLAST0-Result
- -- or the Seq-align.
- result BLAST0-Result,
- seqalign Seq-align-set,
- -- Either a BLAST0-Result (result) or a Seq-align-set (seqalign)
- -- is returned. The behavior is determined by the BOOLEAN
- -- BLAST0-search.return-BLAST0result. If a seqalign is
- -- returned, then the Seq-align is of type dense-diag if the
- -- query and subject sequence have the same length (i.e., if
- -- both are nucleotide or protein as in blastn, blastp, and blastx);
- -- a set of Seq-align of type Std-seg is returned if the query and
- -- subject have different lengths, as in blastx or tblastn.
- parms SEQUENCE OF VisibleString, -- BLAST parameters of search
- stats SEQUENCE OF VisibleString, -- accumulated search statistics
- warning BLAST0-Warning, -- see enum in .h files of blast function lib
- status BLAST0-Status -- see enum in .h files of blast function lib
- }
-
- BLAST0-Job-desc ::= SEQUENCE {
- jid ENUMERATED { -- job identifier
- not-set (0),
- neighborhood (1), -- generating blast neighborhood
- search (2), -- database search
- threecomps (3) -- blast3 comparisons to find three-way alignments
- },
- desc VisibleString, -- short description of job
- size INTEGER -- no. of units of work in job (0 if unknown)
- }
-
- BLAST0-Job-progress ::= SEQUENCE { -- doubles as an "I'm alive" message
- done INTEGER, -- no. of units of work completed thusfar
- positives INTEGER -- no. of successful jobs (e.g., no. of seqs matched)
- }
-
- BLAST0-Preface ::= SEQUENCE {
- program VisibleString, -- name of server program
- desc VisibleString, -- concise description of program
- version VisibleString OPTIONAL, -- version number of server program
- dev-date VisibleString OPTIONAL, -- development date of server program
- bld-date VisibleString OPTIONAL, -- build date of server program
- cit SEQUENCE OF VisibleString OPTIONAL, -- journal or other citations
- notice SEQUENCE OF VisibleString OPTIONAL, -- cautionaries about program
- prog-usage SEQUENCE OF VisibleString OPTIONAL, -- information
- -- about valid options for this program
- susage BLAST0-Seq-usage, -- how subject database sequences are used
- qusage BLAST0-Seq-usage -- how query sequences are used
- }
-
- BLAST0-KA-Blk ::= SEQUENCE { -- Karlin-Altschul statistics parameter block
- matid INTEGER, -- Matrix identifier (0, 1, 2, 3,...)
-
- -- "frames" is the reading frame in each sequence {-3, -2, -1, 0, +1, +2, +3}.
- -- There are as many frames listed as the value of n-way above.
- -- For the typical BLAST search, there will be just two; for BLAST3 there
- -- will be three.
- -- A reading frame of 0 might be specified in a variety of cases:
- -- if the original sequence is protein (e.g., the query with BLASTP);
- -- if the original sequence is nucleic acid and this KA-Blk is to be
- -- applied uniformly to all reading frames (as in the database with TBLASTN).
- -- Untranslated nucleotide sequences may have frames of +1 or -1.
- frames SEQUENCE OF INTEGER, -- query 1st, subject 2nd (see n-way, though)
-
- -- Lambda, K, and H are computed under a variety of assumptions
- -- (residue composition, scoring system). Values < 0 are reported
- -- when the computation failed or when the user did not provide a value.
- -- (for a description of lambda, k and h see Karlin and Altschul,
- -- Proc. Natl. Acad. Sci. USA, 87:2264-68 (1990)).
- lambda REAL,
- k REAL,
- h REAL
- }
-
-
- BLAST0-Db-Desc ::= SEQUENCE {
- name VisibleString,
- type BLAST0-Alphatype,
- def VisibleString OPTIONAL, -- full definition
- rel-date VisibleString OPTIONAL, -- date of release from the curator
- bld-date VisibleString OPTIONAL, -- date of build (brought on-line)
- count INTEGER OPTIONAL, -- no. of sequences in database
- totlen INTEGER OPTIONAL, -- total no. of letters or residues in database
- maxlen INTEGER OPTIONAL -- max. no. of letters or residues in any one seq
- }
-
- BLAST0-Result ::= SEQUENCE {
- hist BLAST0-Histogram OPTIONAL,
- count INTEGER,
- -- no. of hitlists (e.g., the no. of db sequences matched)
- hitlists SEQUENCE OF BLAST0-HitList
- -- each subject sequence has it's own BLAST0-HitList
- }
-
- -- Used to produce Histogram in the traditional BLAST output (with H=1).
- BLAST0-Histogram ::= SEQUENCE {
- expect REAL,
- observed INTEGER,
- base INTEGER,
- nbars INTEGER,
- bar SEQUENCE OF BLAST0-Histogram-bar
- }
-
- BLAST0-Histogram-bar ::= SEQUENCE {
- x REAL,
- -- theoret. E value, before the search, 1st column in Histogram
- n INTEGER
- -- real. E value, after the search, 2nd column in Histogram
- -- The 3rd histogram column is found by subtracting the value
- -- in the 2nd column from the value in the 2nd column for the
- -- next row.
- }
-
- -- BLAST0-HitList is a list of the HSPs involving a set of sequences.
- BLAST0-HitList ::= SEQUENCE {
- count INTEGER, -- no. of hsps contained in this BLAST0-HitList
- -- also the number of hits on a single database sequence.
- kablk SEQUENCE OF BLAST0-KA-Blk OPTIONAL,
- -- one for each scoring system
- hsps SEQUENCE OF BLAST0-HSP,
- seqs SEQUENCE OF BLAST0-Sequence
- }
-
- -- BLAST0-HSP (High-scoring Segment Pair) is the fundamental unit of BLAST output
- BLAST0-HSP ::= SEQUENCE {
- matid INTEGER, -- scoring matrix identifier
- -- the score reported below contain an Object-id that references
- -- different types of scores (e.g., p-value, BLAST "score")
- -- by an integer. The structure BLAST0-Score-Info, returned as
- -- part of the BLAST0-Response, provides the mapping between
- -- this integer and the type of score.
- scores Score-set, -- this is the equivalent of SEQUENCE OF Score
- len INTEGER, -- length of each segment (in the alignment alphabet)
- segs SEQUENCE OF BLAST0-Segment
- }
-
- BLAST0-Segment ::= SEQUENCE {
- loc BLAST0-Seq-interval,
- str BLAST0-Seq-data OPTIONAL,
- str-raw BLAST0-Seq-data OPTIONAL -- str prior to translation
- }
-
- BLAST0-Sequence ::= SEQUENCE {
- desc SEQUENCE OF BLAST0-Seq-desc,
- length INTEGER, -- length of complete sequence (untranslated)
- gcode INTEGER OPTIONAL, -- genetic code
- seq BLAST0-Seq-data OPTIONAL
- }
-
- BLAST0-Seq-desc ::= SEQUENCE {
- id BLAST0-Seq-id,
- defline VisibleString OPTIONAL
- }
-
- BLAST0-Seq-id ::= SET OF CHOICE {
- giid INTEGER, -- zero if no giid is available
- textid VisibleString -- other ids, in "long FASTA" syntax
- }
-
- BLAST0-Seq-data ::= CHOICE {
- ncbistdaa OCTET STRING, -- standard amino acid alphabet (NCBIstdaa)
- ncbi2na OCTET STRING, -- standard nucleic acid alphabet (NCBI2na)
- ncbi4na OCTET STRING -- alternate nucleic acid alphabet (NCBI4na)
- }
-
- BLAST0-Seq-interval ::= SEQUENCE {
- strand ENUMERATED {
- plus (1), -- interval is on the plus strand
- minus (2), -- interval is on the complementary, minus strand
- both (3), -- "from" and "to" are specified relative to plus strand
- plus-rf (5), -- restricted to reading frame implied by "from"
- minus-rf (6) -- restricted to reading frame implied by "from"
- } OPTIONAL, -- only specified when nt. or translated nt. is involved.
- -- Restricted means the interval applies only to the implied reading frame.
- -- When needed, the reading frame is found by computing "from" modulo 3 + 1.
- from INTEGER, -- zero-based offset
- to INTEGER -- zero-based offset
- }
-
- -- A particular scoring scheme is referenced in the BLAST0-Result and
- -- the Seq-align-set only by an integer. BLAST0-Score-Info provides a
- -- mapping between the integer ("sid") and the name and/or
- -- definition of a scoring scheme.
- BLAST0-Score-Info ::= SEQUENCE {
- sid INTEGER,
- tag VisibleString, -- short name
- desc VisibleString OPTIONAL -- longer description
- }
-
- BLAST0-Alphatype ::= ENUMERATED {
- not-set (0),
- amino-acid (1),
- nucleic-acid (2),
- other (255)
- }
-
- BLAST0-Seq-usage ::= SEQUENCE {
- raw BLAST0-Alphatype, -- the input sequence type
- cooked BLAST0-Alphatype -- the sequence type actually searched
- }
-
- BLAST0-Alpha-ID ::= ENUMERATED {
- ncbi4na (4), -- 4 bit nucleotide code
- ncbistdaa (11) -- consecutive codes for standard amino acids, 0-25
- }
-
- BLAST0-Matrix ::= SEQUENCE { -- substitution scoring matrix
- matid INTEGER,
- name VisibleString, -- name for this scoring system
- comments SEQUENCE OF VisibleString OPTIONAL,
- qalpha BLAST0-Alpha-ID, -- query alphabet
- salpha BLAST0-Alpha-ID, -- subject/database alphabet
- scores CHOICE { -- length of sequence = sizeof(qalpha) X sizeof(salpha)
- scaled-ints SEQUENCE { -- scaled integer scores
- scale REAL, -- multiply ints by scale, 0 means unscaled
- ints SEQUENCE OF INTEGER -- presented in qalpha-major order
- -- NOTE! undefined scores are indicated by the special
- -- value -2147483648 (INT4_MIN) before scaling
- },
- reals SEQUENCE OF REAL -- presented in qalpha-major order
- -- NOTE! undefined scores are indicated by the special value -1.e32
- } OPTIONAL -- omit scores when just associating matid with matrix name
- }
-
- -- BLAST0-Status is a general message for acknowledgments, warnings, and errors
- BLAST0-Status ::= SEQUENCE {
- code INTEGER, -- program exit status, warning message identifier, etc.
- -- code 0 means no error
- reason VisibleString OPTIONAL -- description of non-zero code
- }
-
- BLAST0-Warning ::= BLAST0-Status
-
- BLAST0-Queued ::= SEQUENCE { -- doubles as "I'm alive" message
- name VisibleString, -- name of this queue
- length INTEGER -- no. of requests ahead of this one in the queue
- }
-
- BLAST0-Ack ::= SEQUENCE { -- acknowledgment
- code INTEGER,
- reason VisibleString OPTIONAL
- }
-
- -- BLAST0-Outblk is a model of complete blast application program output
- -- as it might be archived for future reference; however during an actual search
- -- the choices are produced as separate, distinct BLAST0-Responses.
- BLAST0-Outblk ::= SET OF CHOICE {
- preface BLAST0-Preface,
- query BLAST0-Sequence,
- dbdesc BLAST0-Db-Desc,
- matrix SEQUENCE OF BLAST0-Matrix, -- the scoring scheme(s) used (optional)
- kablk SEQUENCE OF BLAST0-KA-Blk, -- Karlin-Altschul data block
- job-start BLAST0-Job-desc,
- job-progress BLAST0-Job-progress,
- job-done BLAST0-Job-progress,
- result BLAST0-Result,
- parms SEQUENCE OF VisibleString, -- parameters of search
- stats SEQUENCE OF VisibleString, -- accumulated search statistics
- warning BLAST0-Warning,
- status BLAST0-Status
- }
-
-
- END
-